var app = angular.module('ZJPC');
app.controller('TrackLiCarFileCtrl', ['$scope','$state','$rootScope','$stateParams','DataService',TrackLiCarFileCtrl]);

function TrackLiCarFileCtrl($scope,$state,$rootScope,$stateParams,DataService) {

	$scope.perlist = []

	$scope.pageOption = {
			itemCount:1,
			pageSize:10  
	}

	$scope.$on('list',function(d,data){
		$scope.perlist = data;
		$scope.pageOption = {
			itemCount:data.length,
			pageSize:10  
		}
		$scope.getData([0,$scope.pageOption.pageSize-1])
	})

	$scope.getData = function(item){
		$scope.list = $scope.perlist.slice(item[0]-1,item[1])

	}
	
}